Skip to content

Add hey setup omarchy and the bar unread indicator - #225

Merged
jeremy merged 2 commits into
omarchyfrom
omarchy-setup
Aug 21, 2026
Merged

Add hey setup omarchy and the bar unread indicator#225
jeremy merged 2 commits into
omarchyfrom
omarchy-setup

Conversation

@jeremy

@jeremy jeremy commented Aug 20, 2026

Copy link
Copy Markdown
Member

Second of the three-PR stack (theming #220 → this → toasts #222). Includes the docs commit: README's Omarchy section and docs/omarchy.md, the full design record.

What

hey setup omarchy installs hey-cli into the Omarchy desktop: a HEY TUI launcher entry under app-id org.omarchy.hey, a HEY row in the SUPER+SPACE menu, an inline hey-unread command module on the bar, and a hey.toml.tpl theme template so theme authors can tune the TUI's accent overlay. Every step is idempotent, reported separately, and --remove reverses them all. The keybinding is printed, never written — bindings.lua stays the user's; the hint spells out the focus command because the lua helper's { tui = ... } form would derive a non-matching app-id from a multi-word command.

hey omarchy bar-status (hidden) is what the bar module runs every three minutes: a Waybar-style JSON object when the Imbox has unread mail and nothing otherwise. An indicator, not a count. Logged out, offline, or a failed account selection all print nothing and exit 0 — a bar is no place for an error message. One Imbox page decides: HEY orders postings unseen-first (boxes_controller.rb orders by [:seen, observed_at desc]), so any unread mail is on page 1.

Review hardening (from the bots' first pass)

  • A fresh shell.json is seeded with "version": 1 — the shell ignores a version-less config entirely (shell.qml warns and falls back to defaults) — and an existing version-less or non-object file fails the step with a hint instead of being edited into dead config.
  • --remove restores an initially-absent bar layout: if what remains after removing our module equals Omarchy's current default layout, the layout is dropped so the user goes back to inheriting future default changes.
  • The omarchy command is exempt from pre-run account scoping and selects the configured account itself, treating failure as a dark indicator — preserving both scoping and the never-fails contract.
  • The rendered hey.toml template now carries the reference colors (background, blue/bright_blue, bright_foreground) the accent gate needs, since a rendered file is the only theme file the TUI reads.

Summary by cubic

Installs HEY into the Omarchy desktop and adds an Imbox unread bar indicator. Old: no desktop integration. New: hey setup omarchy installs a HEY TUI launcher, a SUPER+SPACE menu row, an inline hey-unread bar module, and a hey.toml.tpl theme template; --remove reverses.

  • One app-id focus: all surfaces use org.omarchy.hey. The bar runs every 180s via hey omarchy bar-status and prints a Waybar-style JSON module only when unread; logged out, offline, or degraded config stays silent and exits 0.
  • Safe config writes: inserts a marker block into ~/.config/omarchy/extensions/omarchy-menu.jsonc. Seeds ~/.config/omarchy/shell.json with "version": 1; refuses non-JSON or version-less files with a hint. Writes are atomic, preserve modes, and follow symlinks. Seeds the default bar layout when absent and restores it on --remove.
  • Theme template: writes ~/.config/omarchy/themed/hey.toml.tpl; triggers omarchy-theme-refresh when available; templates not written by hey are kept on install/remove.
  • Keybinding: prints an o.bind(...) hint and never edits bindings.lua.
  • Trust and JSON output: install requires ~/.local/state/omarchy or OMARCHY_PATH (and an absolute HOME); removal works without Omarchy. omarchy commands ignore repository-local config and are exempt from account scoping; setup omarchy edits fixed desktop paths only and does not use runtime config. List-only formats are refused up front. JSON errors include per-step results in Meta.steps.

Required action: if ~/.config/omarchy/shell.json exists without "version": 1, add it before running hey setup omarchy.

Written for commit 17de3b2. Summary will update on new commits.

Review in cubic

Copilot AI balanced review requested due to automatic review settings August 20, 2026 20:54
@jeremy
jeremy requested a review from a team as a code owner August 20, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Omarchy desktop integration, unread bar status, theme support, documentation, and tests.

Changes:

  • Adds idempotent Omarchy setup/removal steps.
  • Adds the hidden unread Imbox bar command.
  • Documents the integration and updates command discovery.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.surface Lists Omarchy setup commands.
README.md Adds Omarchy setup instructions.
docs/omarchy.md Records integration design and behavior.
internal/cmd/accounts_test.go Tests account-scope exemption.
internal/cmd/omarchy.go Implements setup, removal, and bar status.
internal/cmd/omarchy/hey.toml.tpl Defines the theme template.
internal/cmd/omarchy_test.go Tests setup and unread status behavior.
internal/cmd/root.go Registers and scopes the Omarchy command.
internal/cmd/setup.go Registers the setup subcommand.
Suppressed comments (1)

internal/cmd/omarchy.go:456

  • --remove unconditionally deletes the user template, so any customization made to the installed file (or a template that predated setup) is lost. Removal should only delete content demonstrably owned and unchanged by hey-cli; otherwise preserve it and report that it was left in place.
	changed, err := removeFileIfPresent(path)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go
Comment thread docs/omarchy.md Outdated
Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6bb9f72333

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b802b10d27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go Outdated
@jeremy
jeremy force-pushed the omarchy-setup branch 2 times, most recently from a9267f4 to cf38ec5 Compare August 20, 2026 21:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf38ec578c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d97c920257

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/setup.go
Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go
Comment thread internal/cmd/omarchy.go
@jeremy
jeremy force-pushed the omarchy-setup branch 2 times, most recently from 2c92366 to f43ce49 Compare August 20, 2026 22:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f43ce49a5f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de5efeb287

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76d5886a43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/local_config_trust.go Outdated
Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0e5b9c8b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/root.go Outdated
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9734a8343e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/root.go
Comment thread internal/cmd/omarchy.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 116ae392fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go Outdated
Comment thread internal/cmd/omarchy.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bb36eb4cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/omarchy.go
jeremy added 2 commits August 20, 2026 18:27
hey setup omarchy installs hey-cli into the Omarchy desktop: a HEY TUI
launcher entry under app-id org.omarchy.hey, a HEY row in the SUPER+SPACE
menu, an inline hey-unread command module on the bar, and a hey.toml.tpl
theme template so theme authors can tune the TUI's accent overlay. Every
step is idempotent, reported separately, and --remove reverses them all.
The keybinding is printed, never written -- bindings.lua stays the user's.

hey omarchy bar-status (hidden) is what the bar module runs every three
minutes: a Waybar-style JSON object when the Imbox has unread mail and
nothing otherwise. An indicator, not a count -- a number is the attention
treadmill HEY exists to end. Logged out or offline also prints nothing and
exits 0, because a bar is no place for an error message.

Every surface -- launcher, menu row, bar click, suggested keybinding --
shares one app-id so they all focus the same window.
README gains an Omarchy section (theming is zero-setup; yay -S hey-cli;
hey setup omarchy) and docs/omarchy.md records the full design: the accent
and selection gates with their thresholds, the foot fresh-window caveat,
the atomic-mv watch, the decisions (indicator not count, overlay not hex
port, complement the shipped web app), follow-ups in order, and the
anti-features so they stay anti.
@jeremy
jeremy merged commit 12a3a63 into main Aug 21, 2026
23 checks passed
@jeremy
jeremy deleted the omarchy-setup branch August 21, 2026 03:25
jeremy added a commit that referenced this pull request Aug 21, 2026
- baselineSkillInstalled requires the ownership marker as well as a
  regular file — the final presence predicate aligned with the rules
  every write path enforces, so an unmarked hand-authored baseline is
  refused by install AND never reported as a healthy installation.
- The agent-local setup subcommands (and skill) enroll in #225's
  commandIgnoresLocalConfig path: they load the global config only,
  degrading to defaults, so a malformed repository .hey/config.json
  cannot stop the installer's setup agents handoff before the trust
  exemption is even consulted. Runtime-config commands still surface
  the parse error.
- install.ps1 gets the same optional-setup guard install.sh got: a
  wizard that exits nonzero (declined OAuth, timeout, busy callback
  port) prints next steps instead of failing or silently swallowing a
  completed install, with $LASTEXITCODE checked because Windows
  PowerShell 5.1 does not throw on native nonzero exits.
jeremy added a commit that referenced this pull request Aug 21, 2026
- baselineSkillInstalled requires the ownership marker as well as a
  regular file — the final presence predicate aligned with the rules
  every write path enforces, so an unmarked hand-authored baseline is
  refused by install AND never reported as a healthy installation.
- The agent-local setup subcommands (and skill) enroll in #225's
  commandIgnoresLocalConfig path: they load the global config only,
  degrading to defaults, so a malformed repository .hey/config.json
  cannot stop the installer's setup agents handoff before the trust
  exemption is even consulted. Runtime-config commands still surface
  the parse error.
- install.ps1 gets the same optional-setup guard install.sh got: a
  wizard that exits nonzero (declined OAuth, timeout, busy callback
  port) prints next steps instead of failing or silently swallowing a
  completed install, with $LASTEXITCODE checked because Windows
  PowerShell 5.1 does not throw on native nonzero exits.
monorkin pushed a commit that referenced this pull request Aug 21, 2026
- baselineSkillInstalled requires the ownership marker as well as a
  regular file — the final presence predicate aligned with the rules
  every write path enforces, so an unmarked hand-authored baseline is
  refused by install AND never reported as a healthy installation.
- The agent-local setup subcommands (and skill) enroll in #225's
  commandIgnoresLocalConfig path: they load the global config only,
  degrading to defaults, so a malformed repository .hey/config.json
  cannot stop the installer's setup agents handoff before the trust
  exemption is even consulted. Runtime-config commands still surface
  the parse error.
- install.ps1 gets the same optional-setup guard install.sh got: a
  wizard that exits nonzero (declined OAuth, timeout, busy callback
  port) prints next steps instead of failing or silently swallowing a
  completed install, with $LASTEXITCODE checked because Windows
  PowerShell 5.1 does not throw on native nonzero exits.
monorkin pushed a commit that referenced this pull request Aug 21, 2026
- baselineSkillInstalled requires the ownership marker as well as a
  regular file — the final presence predicate aligned with the rules
  every write path enforces, so an unmarked hand-authored baseline is
  refused by install AND never reported as a healthy installation.
- The agent-local setup subcommands (and skill) enroll in #225's
  commandIgnoresLocalConfig path: they load the global config only,
  degrading to defaults, so a malformed repository .hey/config.json
  cannot stop the installer's setup agents handoff before the trust
  exemption is even consulted. Runtime-config commands still surface
  the parse error.
- install.ps1 gets the same optional-setup guard install.sh got: a
  wizard that exits nonzero (declined OAuth, timeout, busy callback
  port) prints next steps instead of failing or silently swallowing a
  completed install, with $LASTEXITCODE checked because Windows
  PowerShell 5.1 does not throw on native nonzero exits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants